﻿@* Ui层项目入口程序 *@
@using Util.Generators.Helpers
@model Util.Generators.Contexts.EntityContext
@{
    var service = new GenerateService( Model );
    Model.Output.FileNameNoExtension = "Program";
    Model.Output.Extension = ".cs";
    Model.Output.RelativeRootPath = $"src/{service.GetUiProjectName()}";
}
using Util;
using Util.Infrastructure;
using Util.Events.Infrastructure;
using Util.Logging.Serilog;
using Util.Ui.NgZorro;

//创建Web应用程序生成器
var builder = WebApplication.CreateBuilder( args );

//配置Util服务
ServiceRegistrarConfig.Instance.DisableDependencyServiceRegistrar();
ServiceRegistrarConfig.Instance.DisableLocalEventBusServiceRegistrar();
builder.AsBuild()
    .AddSerilog()
    .AddNgZorro()
    .AddUtil();

//构建Web应用程序
var app = builder.Build();

//配置请求管道
app.UseNgZorro();

//运行应用
app.Run();